package com.nn.api;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

/**
 * @description
 * @Author 白起
 * @Data 2020/11/28 21:36
 */
@RestController
public class OrderApiController {


    @Autowired
    private RestTemplate restTemplate;


    @GetMapping("getOrder")
    public String getOrder() {

        String url = "http://app-nn-member/getMember";

        String member = restTemplate.getForObject(url, String.class);
        return "订单服务 调用会员服务，返回结果：" + member;

    }
}
